package com.wrupple.muba.catalogs.client.activity.process.impl;

import java.util.List;

import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.user.client.ui.Widget;
import com.wrupple.muba.catalogs.client.activity.process.InteractionProcess;
import com.wrupple.muba.catalogs.client.activity.process.task.InteractionState;
import com.wrupple.muba.common.shared.SequentialProcess;
import com.wrupple.muba.widget.client.view.DataInputView;

public class SimpleInteractionProcess<O> extends SequentialProcess<O, O> implements
		InteractionProcess<O> {
	
	InteractionState<O> state;
	
	public SimpleInteractionProcess(InteractionState<O> state) {
		super();
		this.state = state;
		add(state);
	}

	@Override
	public Widget asWidget() {
		return (Widget) context.getOutputFeature();
	}

	@Override
	public void setAction(List<? extends HasClickHandlers> actions) {
		state.setAction(actions);
	}

	@Override
	public DataInputView<O> getEditor() {
		return state.getEditor();
	}
	

	

}
